﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Them_TT.ascx.cs" Inherits="XLDL.Admin.Them_TT" %>
<style type="text/css">
    .style1
    {
        width: 100%;
    }
    </style>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>--%>

<table cellspacing="1" class="style1">
    <tr>
        <td align="left" valign="top">
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td align="left" width="50">
                        <asp:Button ID="Button_Size" runat="server" Text="Size" 
                            onclick="Button_Size_Click" />
                    </td>
                    
                    <td>
                    <asp:Button ID="Button_Hinh" runat="server" Text="Hình" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="left" valign="top">
          
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left">
                            ID sản phẩm:</td>
                        <td align="left" valign="middle" width="100"><span style="padding-left:0px">
                            <asp:DropDownList ID="Drop_id" runat="server" Width="90px">
                            </asp:DropDownList></span>
                        </td>
                        <td align="left" valign="middle" width="100">
                            <asp:Button ID="Button_tim" runat="server" onclick="Button_tim_Click" 
                                Text="Tìm" />
                        </td>
                        <td align="left" valign="middle" width="300px">
                            <asp:Label ID="lbl_tensp" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" width="90">
                            Size:</td>
                        <td align="left" valign="middle">
                            <asp:TextBox ID="txt_size" runat="server" Width="91px"></asp:TextBox>
                        </td>
                        <td align="left" valign="middle">
                            
                            <asp:DropDownList ID="Drop_size" runat="server" Width="90px">
                                <asp:ListItem>L</asp:ListItem>
                                <asp:ListItem>M</asp:ListItem>
                                <asp:ListItem>S</asp:ListItem>
                                <asp:ListItem>XL</asp:ListItem>
                                <asp:ListItem>XXL</asp:ListItem>
                             </asp:DropDownList>
                            
                        </td>
                        <td align="left" valign="middle">
                            <asp:Label ID="lbl_id_size" runat="server" Visible="False"></asp:Label>
                        </td>
                    </tr>
                </table>
            
        </td>
    </tr>
    <tr>
        <td align="left">
            <table cellspacing="0" cellpadding="0">
                <tr>
                    <td align="left" width="60">
                        <asp:Button ID="Button_them" runat="server" Text="Thêm" 
                            onclick="Button_them_Click" /></td>
                    <td align="left" width="60">
                        <asp:Button ID="Button_sua" runat="server" Text="Sửa" 
                            onclick="Button_sua_Click" /></td>
                    <td align="left" width="60">
                        <asp:Button ID="Button_xoa" runat="server" Text="Xoá" 
                            onclick="Button_xoa_Click" /></td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="left" valign="top">
            <asp:GridView ID="Luoi_size" runat="server" AutoGenerateColumns="False" 
                onselectedindexchanging="Luoi_size_SelectedIndexChanging">
                <Columns>
                    <asp:BoundField DataField="id_size" HeaderText="ID">
                        <ItemStyle Width="50px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="id_sp" HeaderText="ID SP" Visible="False" />
                    <asp:BoundField DataField="So_size" HeaderText="Size">
                        <ItemStyle Width="50px" />
                    </asp:BoundField>
                    <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                </Columns>
                <SelectedRowStyle BackColor="#CCCCCC" />
            </asp:GridView>
        </td>
    </tr>
    <tr>
        <td align="left" valign="top">
            <asp:Label ID="lbl_thongbao" runat="server" Text="Không tìm thấy !" 
                Visible="False"></asp:Label>
        </td>
    </tr>
</table>

<table cellpadding="0" cellspacing="0" class="style1">
    <tr>
        <td>
            <asp:FileUpload ID="FileUpload_hinh" runat="server" class="multi" />
            &nbsp;<asp:Button ID="Button_upload" runat="server" onclick="Button_upload_Click" 
                Text="Upload All" />
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="lbl_tb" runat="server"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
           <table cellspacing="0" cellpadding="0">
                <tr>
                    <td align="left" width="60">
                        <asp:Button ID="Button_th" runat="server" Text="Thêm" 
                            onclick="Button_them_Click" /></td>
                    <td align="left" width="60">
                        <asp:Button ID="Button_su" runat="server" Text="Sửa" 
                            onclick="Button_sua_Click" /></td>
                    <td align="left" width="60">
                        <asp:Button ID="Button_xo" runat="server" Text="Xoá" 
                            onclick="Button_xoa_Click" /></td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            
            <asp:GridView ID="Luoi_hinh" runat="server" AutoGenerateColumns="False" 
                    onselectedindexchanging="Luoi_hinh_SelectedIndexChanging">
                <Columns>
                    <asp:BoundField DataField="id_hinh" HeaderText="ID" />
                    <asp:TemplateField HeaderText="Hình ảnh">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("hinh_anh_2") %>' 
                                Tooltip='<%# Eval("hinh_anh_2") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <table cellspacing="1" class="style1">
                                <tr>
                                    <td align="center">
                                        <asp:Image ID="hinh_anh" runat="server" AlternateText='<%# Eval("hinh_anh_2") %>' 
                                            ImageUrl='<%# "~/Images/"+Eval("hinh_anh_2") %>' Width="80px" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <asp:Label ID="lbl_hinh_anh" runat="server" Text='<%# Eval("hinh_anh_2") %>'></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="hien_thi" HeaderText="Hiển thị" />
                    <asp:CommandField SelectText="Chọn" ShowSelectButton="True" />
                </Columns>
                <SelectedRowStyle BackColor="#CCCCCC" />
            </asp:GridView>
            </ContentTemplate>
            <Triggers>
            <asp:PostBackTrigger ControlID="Luoi_hinh" />
            </Triggers>
            </asp:UpdatePanel>
            
        </td>
    </tr>
</table>


<%--</ContentTemplate>
</asp:UpdatePanel>--%>